/*
 * @Author: your name
 * @Date: 2022-01-22 15:43:27
 * @LastEditTime: 2022-01-22 15:43:27
 * @LastEditors: your name
 * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 * @FilePath: \创作平台\admin\src\utils\copyText.js
 */
import { message } from "antd";
const copyAction = (str) => {
    const createInput = document.createElement("input");
    createInput.value = str;
    document.body.appendChild(createInput);
    createInput.select();
    document.execCommand("Copy"); // document执行复制操作
    createInput.remove();
    message.success("复制成功!");
};
export default copyAction;